﻿using System;
using Google.Protobuf;

namespace GSE.Rpc
{
    public enum ResponseStatus
    {
        Ok,
        ServiceNotExists,
        ParamIncorrect,
        ServiceProcessError
    }

    public abstract class RpcObject
    {
        public const byte protoVerNo = 1;
        protected UInt16 transactionID;
        protected IMessage param;
        protected byte[] dataBytes;

        public abstract byte[] Encode();

        public UInt16 TransactionID
        {
            get { return transactionID; }
        }

        public byte[] Data
        {
            get { return dataBytes; }
        }
    }
}
